package com.yang.service.api;

import com.yang.service.model.dto.post.ScarPostDTO;
import com.yang.service.model.vo.ScarVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by baipan
 * Date: 9:27
 */
@FeignClient(name = "${zhy.endpoint.basedata}")
public interface ScarService {
    /**
     * 通过用户id获取所有的购物车
     */
    @GetMapping("scar/list")
    List<ScarVO> getAllScar(@RequestParam(value = "userId") String userId);

    /**
     * 新增订单
     */
    @PostMapping("scar")
    boolean addScar(@RequestBody ScarPostDTO dto);

    /**
     * deleteBatch
     */
    @DeleteMapping("scar/batch")
    boolean deleteBatch(@RequestParam(value = "oderIds") List<String> oderIds);
}
